import Vue from 'vue'
import elementui from 'element-ui';
Vue.use(elementui);

// 请求
import axios from 'axios';
Vue.prototype.$axios = axios;
import as from '@/service/index'
Vue.prototype.$as = as;

import image from './main/index'

//创建构造器
const Dialog = Vue.extend(image)

image.install = function (options ={}) {
  //创建实例
  let instance = new Dialog({
    data: options
  })


  instance.callbacks = () => {
    options.makeSure(options.title)
    options.outerVisible = false
  }


  instance.$mount()
  document.body.appendChild(instance.$el)
  Vue.nextTick(()=>{
    instance.outerVisible = true
  })
}
export default image;
